import request from '@/utils/request'

// 查询配件列表
export function listPart(query) {
  return request({
    url: '/category/part/list',
    method: 'get',
    params: query
  })
}

// 查询配件详细
export function getPart(partId) {
  return request({
    url: '/category/part/' + partId,
    method: 'get'
  })
}

// 新增配件
export function addPart(data) {
  return request({
    url: '/category/part',
    method: 'post',
    data: data
  })
}

// 修改配件
export function updatePart(data) {
  return request({
    url: '/category/part',
    method: 'put',
    data: data
  })
}

// 删除配件
export function delPart(partId) {
  return request({
    url: '/category/part/' + partId,
    method: 'delete'
  })
}
